<template>
	<div>
		<el-dialog title="查看详情" width="600px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
			<table class="table table-bordered" align="center" width="100%" style="word-break:break-all; margin-bottom:50px;  font-size:13px;">
				<tbody>
				 <tr>
						<td class="title" width="100">编号：</td>
						<td>
							{{form.oper_id}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">模块标题：</td>
						<td>
							{{form.title}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">业务类型：</td>
						<td>
							<span v-if="form.business_type == '0'">其它 </span>
							<span v-if="form.business_type == '1'">新增</span>
							<span v-if="form.business_type == '2'">修改</span>
							<span v-if="form.business_type == '3'">删除</span>
							<span v-if="form.business_type == '4'">授权</span>
							<span v-if="form.business_type == '5'">导出</span>
							<span v-if="form.business_type == '6'">导入</span>
							<span v-if="form.business_type == '7'">强退</span>
							<span v-if="form.business_type == '8'">生成代码</span>
							<span v-if="form.business_type == '9'">清空数据</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">方法名称：</td>
						<td>
							{{form.method}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">请求方式：</td>
						<td>
							{{form.request_method}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">操作类别：</td>
						<td>
							<span v-if="form.operator_type == '0'">其它</span>
							<span v-if="form.operator_type == '1'">后台用户</span>
							<span v-if="form.operator_type == '2'">手机端用户</span>
						</td>
				</tr>
				<tr>
						<td class="title" width="100">操作人员：</td>
						<td>
							{{form.user_id}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">部门名称：</td>
						<td>
							{{form.dept_name}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">请求URL：</td>
						<td>
							{{form.oper_url}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">主机地址：</td>
						<td>
							{{form.oper_ip}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">操作地点：</td>
						<td>
							{{form.oper_location}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">请求参数：</td>
						<td>
							{{form.oper_param}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">返回参数：</td>
						<td>
							{{form.json_result}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">操作状态：</td>
						<td>
							<span v-if="form.status == '0'">正常</span>
							<span v-if="form.status == '1'">异常</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">错误消息：</td>
						<td>
							{{form.error_msg}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">操作时间：</td>
						<td>
							{{parseTime(form.create_time)}}
						</td>
				</tr>
				</tbody>
			</table>
		</el-dialog>
	</div>
</template>
<script>
import { detail } from '@/api/admin/operlog'
export default {
	name:'operLogdetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{
			},
		}
	},
	methods: {
		open(){
			detail(this.info).then(res => {
				this.form = res.data
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
